#include <iostream>
#include <cmath>
using namespace std;
const int N=1010;
typedef long long ll;
ll a[N][N];
ll b[N][N];
ll c[N][N];
int main()
{
    int n,m,k,t;
    cin>>n>>m>>k>>t;
    for(int i=0;i<k;i++)
    {
        int x,y;
        cin>>x>>y;
        a[x-1][y-1]++;
        a[x+2][y+2]++;
        a[x-1][y+2]--;
        a[x+2][y-1]--;
    }
    b[0][0]=a[0][0];
    for(int i=1;i<=n;i++)
    {
         
        b[i][0]=b[i-1][0]+a[i][0];
    }
    for(int j=1;j<=m;j++)
    {
        b[0][j]=b[0][j-1]+a[0][j];
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=m;j++)
        {
            b[i][j]=b[i-1][j]+b[i][j-1]+a[i][j]-b[i-1][j-1];
        }
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=m;j++)
        {
            if(b[i][j]>1) b[i][j]=1;
            if(b[i][j]<-1) b[i][j]=-1;
            c[i][j]=c[i-1][j]+c[i][j-1]+b[i][j]-c[i-1][j-1];
        }
    }
    int ans=0;
    for(int i=0;i<t;i++)
    {
        ll x1,y1,x2,y2;
        cin>>x1>>y1>>x2>>y2;
        ll sum=(x2-x1+1)*(y2-y1+1);
        ll sum2=c[x2][y2]-c[x1-1][y2]-c[x2][y1-1]+c[x1-1][y1-1];
        if(sum<=sum2) ans++;
    }
    cout<<ans;
    return 0;
}
